package com.zj.cman.admin.user;

import com.zj.cman.modules.user.controller.UserController;
import com.zj.cman.modules.user.entity.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("admin/api/users")
@Slf4j
public class AdminUserController {

    @Autowired
    private UserController userController;

    @GetMapping("/{id}")
    public User getUserById(@PathVariable Long id) {
        log.info("ID-{}-查询用户",id);
        return userController.getUserById(id);
    }

}
